#include <bits/stdc++.h>

/**
 * 判断是否是完全图
 */
int main(){
    int nodes;
    int edges;

    std::cin >> nodes >> edges;

    std::vector<std::vector<int>> graph(nodes+1, std::vector<int>(nodes+1, 0));

    for (int i = 0; i < edges; i++) {
        int u, v;
        std::cin >> u >> v;
        graph[u][v] = 1;
        graph[v][u] = 1;
    }

    bool isComplete = true;
    for (int i=1; i <= nodes; i++) {
        for (int j = 1; j <= nodes; j++) {
            if (i != j && graph[i][j] == 0) {
                isComplete = false;
                break;
            }
        }
    }

    if (isComplete) {
        std::cout << "Yes";
    } else {
        std::cout << "No";
    }


    return 0;
}